#ifndef ROCK_H
#define ROCK_H

#include <QGraphicsItem>
#include "hole.h"

class Board;
class Hole;

class Rock : public QGraphicsItem
{
    qreal w_;
    qreal h_;

    QPointF position_;
    Hole* hole_;
public:
    explicit Rock(Hole* hole, qreal w = 40.0, qreal h = 40.0, QGraphicsItem *parent = 0);
    
    QRectF boundingRect() const;
    QPainterPath shape() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

    Hole* hole();
    Board* board();

    enum { Type = UserType + 2 };

    int type() const
    {
        // Enable the use of qgraphicsitem_cast with this item.
        return Type;
    }
protected:
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
signals:
    
public slots:
    
};

#endif // ROCK_H
